/*
 * device_type.h
 *
 *  Created on: 2023年6月29日
 *      Author: mcealt_DS
 */
#ifndef DEVICE_TYPE_H
#define DEVICE_TYPE_H

#include "config.h"

#define CLI_CMD

//#define RF_FREQUENCY_915MHZ

#ifdef RFM_DEVICE
//#define SM_SOUND
//#define SM_OUTSOUND
//#define SM_MC
//#define SM_EB
//#define SM_KF
#define SM_RL
//#define SM_WS
//#define SM_KP
//#define SM_PIR
//#define SM_WL
//#define SM_SMART_PLUG_US
//#define SM_SMART_PLUG_EU
//#define SM_SMART_PLUG_ITA
//#define SM_SMART_PLUG_UK
//#define SM_TEMPHUMI
#else

#define SM_HUB
#define CONFIG_DPLL

#endif

//插座编译宏定义
#ifdef SM_SMART_PLUG_US  
#define SM_SMART_PLUG
#define PLUG_MODEL_TYPE     (2)
#elif defined(SM_SMART_PLUG_EU)
#define SM_SMART_PLUG
#define PLUG_MODEL_TYPE     (1)
#elif defined(SM_SMART_PLUG_ITA)
#define SM_SMART_PLUG
#define PLUG_MODEL_TYPE     (4)
#elif defined(SM_SMART_PLUG_UK)
#define SM_SMART_PLUG
#define PLUG_MODEL_TYPE     (3)
#endif

#if defined(SM_SOUND) || defined(SM_OUTSOUND) || defined(SM_MC) || defined(SM_EB) || defined(SM_KF) || defined(SM_KP) || defined(SM_PIR) || defined(SM_WL) || defined(SM_TEMPHUMI)
#define SLEEP_DEVICE
#endif

#if defined(SM_KF) || defined(SM_EB)
#define SPVN_DISABLE //有无心跳宏定义
#endif

#if defined(SM_RL) || defined(SM_WS) || defined(SM_SMART_PLUG)
#define SPVN_TIME_DEFAULT_1MIN
#endif


#ifdef RFM_DEVICE
#define CONFIG_NVM_CUSTOM 1
#endif


#if defined(SM_TEMPHUMI)  //注册成功即收到hub的注册接受报文后 不立刻上报心跳 的宏，目的是 子设备需获取正确的信息同步给网关，需由子设备应用逻辑延时或等待完成后产生事件上报
#define IS_JOIN_CONFIRM_SUCCESS_AUTO_SPVN_DISABLE
#endif

//WPC认证，有发射功率的要求
#if defined(SM_SOUND)
#define WPC_MAX_POWER_DECI_DBM                      (120)  //-0.08
#elif defined(SM_OUTSOUND)
#define WPC_MAX_POWER_DECI_DBM                      (100)  //2.11
#elif defined(SM_MC)
#define WPC_MAX_POWER_DECI_DBM                      (140)  //-1.91
#elif defined(SM_EB)
#define WPC_MAX_POWER_DECI_DBM                      (100)  //-0.02
#elif defined(SM_KF)
#define WPC_MAX_POWER_DECI_DBM                      (100)  //-3
#elif defined(SM_RL)
#define WPC_MAX_POWER_DECI_DBM                      (140)  //-3.8
#elif defined(SM_WS)
#define WPC_MAX_POWER_DECI_DBM                      (140)  //-3.8
#elif defined(SM_KP)
#define WPC_MAX_POWER_DECI_DBM                      (120) //-0.64
#elif defined(SM_PIR)
#define WPC_MAX_POWER_DECI_DBM                      (120) //0.31
#elif defined(SM_WL)
#define WPC_MAX_POWER_DECI_DBM                      (100) //2.36
#elif defined(SM_SMART_PLUG_US)
#define WPC_MAX_POWER_DECI_DBM                      (140) //-1.83
#elif defined(SM_SMART_PLUG_EU)
#define WPC_MAX_POWER_DECI_DBM                      (140) //-5.69
#elif defined(SM_SMART_PLUG_ITA)
#define WPC_MAX_POWER_DECI_DBM                      (140)
#elif defined(SM_SMART_PLUG_UK)
#define WPC_MAX_POWER_DECI_DBM                      (140) //-2.58
#elif defined(SM_TEMPHUMI)
#define WPC_MAX_POWER_DECI_DBM                      (140) //-5.21
#elif defined(SM_HUB)
#define WPC_MAX_POWER_DECI_DBM                      (140) //-1.92
#endif

#endif /*DEVICE_TYPE_H*/
